﻿using System.Collections.Generic;
using System.Linq;

namespace ServiceAccessLayer.Infrastructure
{
    public abstract class BaseRepository
    {
        public List<KeyValuePair<string, IEnumerable<string>>> ExtraDataAsHeader { get; set; }

        protected BaseRepository(List<KeyValuePair<string, IEnumerable<string>>> extraDataAsHeader)
        {
            if (extraDataAsHeader != null && extraDataAsHeader.Any())
            {
                ExtraDataAsHeader = extraDataAsHeader;
            }
            else
            {
                ExtraDataAsHeader = new List<KeyValuePair<string, IEnumerable<string>>>();
            }
        }
    }
}
